Currently, to make a device such as a mobile phone or a computer accessible to a user, the system provides the user with many accessibility functions. For example, a text-to-speech function enables a visually impaired user to better interact with the device.
In the existing technology, a specific method for implementing an accessibility function in applications is shown in FIG. 1.
Step 101: A user sends a request for invoking an input control unit to application A installed in a device; after receiving the invocation request, application A invokes the input control unit configured in a system; and when the user triggers an event corresponding to an accessibility function by performing an operation on the input control unit, the input control unit sends the event to a system accessibility manager.
Step 102: After receiving the event, the system accessibility manager determines an accessibility service corresponding to a type of the event based on configuration of each accessibility service in the system, and sends the event to the accessibility service.
Step 103: After receiving the event, the accessibility service determines a service feedback instruction corresponding to the event, invokes an accessibility function engine on the device, and finally implements the accessibility function by using the accessibility function engine based on the service feedback instruction.
In actual applications, the accessibility service in the system is usually provided by third-party application software. It can be seen from step 102 that the third-party application software that provides the accessibility service can obtain operation information of the user and information in a device interface, and can also obtain privacy information of the user on application A. For example, in the previous step, the privacy information is an account and a password that are of the user on application A. As such, a threat is posed to information security of the user.
Currently, there are two methods for alleviating the previous problem: In one method, reliable third-party application software that provides an accessibility service is selected in advance. Apparently, this method cannot completely eliminate security risks brought by the third-party application software to user information. In the other method, the system prohibits enabling of an accessibility service, so information of a user does not need to pass through third-party application software. This method can completely eliminate security risks caused by the third-party application software to the user information, but the user cannot obtain the accessibility service when the method is used. As such, currently, there is no method that can not only secure user information, but also ensure that the user obtains the accessibility service.